package com.cxx.purchasecharge.core.model.persistence;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.cxx.purchasecharge.core.model.BaseModel;

/**
 * 问题货物评论
 * 
 * @author xiang
 * 
 */
@Entity
@Table (name = "pc_goods_issue_comment")
public class GoodsIssueComment extends BaseModel
{
    private static final long serialVersionUID = 1L;

    private long id;
    private long userCreatedBy;
    private Date date;
    private String comment;

    private GoodsIssue issue;
    
    public GoodsIssueComment () {}

    @Id
    @GeneratedValue (strategy = GenerationType.AUTO)
    public long getId ()
    {
        return id;
    }

    public void setId (long id)
    {
        this.id = id;
    }

    @ManyToOne
    @JoinColumn (name = "goods_issue_id", nullable = false)
    public GoodsIssue getIssue ()
    {
        return issue;
    }

    public void setIssue (GoodsIssue issue)
    {
        this.issue = issue;
    }

    @Column (nullable = false)
    public long getUserCreatedBy()
    {
        return userCreatedBy;
    }

    public void setUserCreatedBy(long userCreatedBy)
    {
        this.userCreatedBy = userCreatedBy;
    }

    @Column (nullable = false)
    public Date getDate ()
    {
        return date;
    }

    public void setDate (Date date)
    {
        this.date = date;
    }

    @Column (nullable = false, length = 2048)
    public String getComment ()
    {
        return comment;
    }

    public void setComment (String comment)
    {
        this.comment = comment;
    }
}
